<template>
    <div>
        <h3>App</h3>
        App里的num:{{ num }}
<!--        <Child :num="num"  @handle="addNum"></Child>-->
<!--        <Child :num="num"  @update:num="num=$event"></Child>-->
<!--        <Child :num..sync="num"></Child>-->
        <Child :num.sync="num" v-bind.sync="user"></Child>
    </div>
</template>

<script>
import Child from '@/components/Child.vue'

export default {
    name: "App",
    components: {Child},
    data() {
        return {
            num: 0,
            user:{
                userName:"张三",
                age:19
            }
        }
    },
    methods: {
        addNum(event) {
            this.num =event
        }
    },
}
</script>